The present invention relates to a three-dimensional labeling apparatus that performs labeling for three-dimensional images, and a labeling method.
Generally, there is a labeling technique in two-dimensional image processing techniques. Labeling in image processing refers to sequentially assigning numbers (label numbers) to connected areas on a binary image (for a color image and a gray image, a binarized image may be used by a known method). The numbers are stored as image data and the image is referred to as a label image.
FIGS. 1A and 1B outline two-dimensional labeling. In FIG. 1A, the reference numeral 101 denotes a binary image which contains image areas (connected areas) 102, 103, and 104. In the drawing, pixel values of the image areas 102, 103, and 104 are 1, and pixel values of other areas are 0. Results (labeling information) of labeling for the image 101 are shown in FIG. 1B. In the drawing, the image areas 102, 103, and 104 are respectively assigned unique numbers 1, 2, and 3 (label), and can be treated independently from each other according to given requests.
Specific two-dimensional labeling is described using image examples shown in FIGS. 2A and 2B (see Industry Research Committee, “Image Processing Applied Technique”). FIG. 2A shows a binary image 200 containing a pixel group comprising pixels 201, 202, 203, and 204 whose pixel value is 1, and a pixel group comprising pixels 205, 206, and 207. First, raster scanning (first scanned in the direction of x axis, in turn after shifting to the direction of y axis) is performed for the image 200. Scanning is performed in the direction of x axis from the upper left corner of the image 200 to the rightmost end thereof (first scanned in the direction of x axis, in turn after shifting to the direction of y axis), and then scanning is also performed for the next line in the same way.
When a pixel whose pixel value is 1 is detected, a search is made for pixels (eight pixels in the vicinity of the detected pixel) that are adjacent to the detected pixel and have a pixel value of 1. In a searched pixel, a number assigned to pixels already scanned is referred and the number is used as the number of the detected pixel. In an example shown in FIG. 2A, first, the pixel 201 is detected. The pixel 201, which is a first scanned pixel, is assigned 1 as the number of the pixel. Next, the pixel 202 whose pixel value is 1 is detected. Since the pixel 202 is adjacent to the pixel 201, the label number of the pixel is 1.
Next, the pixel 203 whose pixel value is 1 is detected, and is assigned 1 as the label number of the pixel because it is adjacent to the pixels 201 and 202.
Hereinafter, in the same way, if the pixel value of a target pixel is 1 and there is no labeled pixel within a neighboring mask of the target pixel, a number that is one greater than a label number used previously is assigned as the label number of the target pixel. If the pixel value of a target pixel is 1 and there are one or more labeled pixels within a neighboring mask of the target pixel, the smallest of the one or more label numbers is used as the label number of the target pixel and information indicating that the plural label numbers are connected is stored in a table. The table is used during re-labeling (renumbering).
Results of labeling for the image 200 shown in FIG. 2A are shown in FIG. 2B. As seen from the drawing, pixels within a same image area are all assigned a same number and pixel numbers different from each other are assigned to different image areas.
The case where the above described two-dimensional labeling is efficiently applied to a three-dimensional binary image (the definition of a three-dimensional binary image will be described later) is described using FIGS. 3A to 3F. In FIG. 3A, the reference numeral 300 denotes a set of three-dimensionally placed pixels, hereinafter referred to as a three-dimensional image. The three-dimensional image 300 is a binary image. The three-dimensional image 300 in turn contains an image area 301 comprising a group of three-dimensionally placed pixels and an image area 302 comprising a group of three-dimensionally placed pixels. The value of pixels within the image areas 301 and 302 is 1 and the value of pixels contained in other areas is 0. In fields of CT and MR, in the three-dimensional image 300, three-dimensional images produced by binarizing whole continuous fault images obtained by an X-ray CT system or the like in a given threshold range correspond to image areas 301 and 302.
The three-dimensional image 300 shown in FIG. 3A is read one pixel at a time in the direction of z axis on a plane (x-y plane) vertical to the direction of z axis to obtain two-dimensional images (two-dimensional plane) 300b to 300f shown in FIGS. 3B to 3F. Numerals 301b to 301f denote the respective image areas on two-dimensional planes 300b to 300f when the image area 301 is split one pixel at a time on the x-y plane as described above. Numeral 302b to 302f denote the respective image areas on two-dimensional planes 300b to 300f when the image area 302 is read one pixel at a time in the direction of z axis on the x-y plane as described above.
Next, the above described labeling is performed for each of the two-dimensional planes 300b to 300f to perform labeling within each image. The labeling is performed within each two-dimensional plane. Although both the image areas 301c and 301d are parts of the image area 301, they are not given a same number. Accordingly, image areas contained in a same area between different two-dimensional planes must be associated with each other. This can be achieved by calculating the correlation between e.g., two-dimensional planes 300c and 300d and connecting image areas between the two-dimensional planes. An equivalent of the above described contents is disclosed in more detail in JP-A No. H01-88689.
However, application of the above described labeling to a three-dimensional image requires dissolving the three-dimensional image to the above described two-dimensional planes, performing the above described labeling for the dissolved two-dimensional planes, and connecting image areas contained in a same area between two-dimensional planes subjected to labeling.